<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>什马研发代码生成系统</title>
    <div th:include="common/include::include"/>
    <!--dev-->
    <!--<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="/static/bootstrap/css/bootstrap-table.min.css" rel="stylesheet"/>-->
</head>
<body>


<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#"></a>
        </div>

        <div class="collapse navbar-collapse" id="bs-example-navbar-collaps-1">
            <ul class="nav navbar-nav">
                <p class="navbar-text">什马研发代码生成管理系统</p>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <p class="navbar-text"><span class="glyphicon glyphicon-user"></span>Admin</p>
                <p class="navbar-text"><span class="glyphicon glyphicon-user"></span>About</p>
                <li><span class="glyphicon glyphicon-off"></span>退出</li>
            </ul>
        </div>
    </div>
</nav>

<div class="container-fluid">

    <div class="row">
        <aside class="col-sm-3 col-md-2" id="controlDashborad">
            <ul class="nav navbar-left">
                <li><a href="#">模型生成</a></li>
                <ul>
                    <li><a href="/enity/before/gen" target="mainFrame">接口模型</a></li>
                    <li><a href="/enity/list" target="mainFrame">模型列表</a></li>
                    <!--<li><a href="#" target="mainFrame">接口模型</a></li>-->
                </ul>
            </ul>
        </aside>

        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2" id="mainDashborad">
            <iframe id="mainFrame" name="mainFrame" onload="initFrame(this);"></iframe>
        </div>
    </div>
</div>
<div class="footer">
</div>
</body>
<style type="text/css">
    aside#controlDashborad {
        position: fixed;
        top: 51px;
        bottom: 0;
        left: 0;
        z-index: 1000;
        display: block;
        overflow-x: hidden;
        overflow-y: auto;
        background-color: #f5f5f5;
        border-right: 1px solid #eee;
    }
    div#mainDashborad {
        position: fixed;
        top: 51px;
    }
    iframe#mainFrame {
        width: 100%;
        border: 0;
    }
</style>
<script type="text/javascript">
    function initFrame(iframe) {
        iframe.style.height = "";
        var contentHeght = 500;
        try {
            contentHeght = window.innerHeight - 50;
            console.log(contentHeght);
        }catch (e){
            console.log(e);
        }
        iframe.style.height = contentHeght + "px";
    }
</script>
</html>